import { get, post, remove, update } from './http';

// 权限资源相关接口
export const login = p => post('/loginByPhsone', p);

// 用户资源相关接口
export const addUser = p => post('/auth/users', p);
export const delUser = p => remove('/auth/users', p);
export const fixUser = p => update('/auth/users', p);
export const getUser = p => get('/auth/users', p);
export const getUserList = p => get('/auth/users', p);
export const getChildren = p => get('/auth/getUserChildInfo', p);

// 题库资源相关接口
export const addQuestion = p => post('/auth/questions', p);
export const delQuestion = p => remove('/auth/questions', p);
export const fixQuestion = p => update('/auth/questions', p);
export const getQuestion = p => get('/auth/questions', p);
export const getQuestionList = p => get('/auth/questions', p);

// 题库模板相关接口
export const addQuestionTemplate = p => post('/auth/questionTemplates', p);
export const delQuestionTemplate = p => remove('/auth/questionTemplates', p);
export const fixQuestionTemplate = p => update('/auth/questionTemplates', p);
export const getQuestionTemplate = p => get('/auth/questionTemplates', p);
export const getQuestionTemplateList = p => get('/auth/questionTemplates', p);

// 卷库资源相关接口
export const addPaper = p => post('/auth/papers', p);
export const delPaper = p => remove('/auth/papers', p);
export const fixPaper = p => update('/auth/papers', p);
export const getPaper = p => get('/auth/papers', p);
export const getPaperList = p => get('/auth/papers', p);

// 卷库模板资源相关接口
export const addPaperTemplate = p => post('/auth/paperTemplates', p);
export const delPaperTemplate = p => remove('/auth/paperTemplates', p);
export const fixPaperTemplate = p => update('/auth/paperTemplates', p);
export const getPaperTemplate = p => get('/auth/paperTemplates', p);
export const getPaperTemplateList = p => get('/auth/paperTemplates', p);

// 学校资源相关接口
export const addSchool = p => post('/auth/schools', p);
export const delSchool = p => remove('/auth/schools', p);
export const fixSchool = p => update('/auth/schools', p);
export const getSchool = p => get('/auth/schools', p);
export const getSchoolList = p => get('/auth/schools', p);

// 班级资源相关接口
export const addClass = p => post('/auth/classes', p);
export const delClass = p => remove('/auth/classes', p);
export const fixClass = p => update('/auth/classes', p);
export const getClass = p => get('/auth/classes', p);
export const getClassList = p => get('/auth/classes', p);

// 班级小组相关接口
export const addClassGroup = p => post('/auth/classeGroups', p);
export const delGroup = p => remove('/auth/classeGroups', p);
export const fixGroup = p => update('/auth/classeGroups', p);
export const getGroup = p => get('/auth/classeGroups', p);
export const getGroupList = p => get('/auth/classeGroups', p);

// 教师资源相关接口
export const addTeacher = p => post('/auth/teachers', p);
export const delTeacher = p => remove('/auth/teachers', p);
export const fixTeacher = p => update('/auth/teachers', p);
export const getTeacher = p => get('/auth/teachers', p);
export const getTeacherList = p => get('/auth/teachers', p);

// 学生资源相关接口
export const addStudent = p => post('/auth/students', p);
export const delStudent = p => remove('/auth/students', p);
export const fixStudent = p => update('/auth/students', p);
export const getStudent = p => get('/auth/students', p);
export const getStudentList = p => get('/auth/students', p);


// 文章资源相关接口
export const addArticle = p => post('/auth/articles', p);
export const delArticle = p => remove('/auth/articles', p);
export const fixArticle = p => update('/auth/articles', p);
export const getArticle = p => get('/auth/articles', p);
export const getArticleList = p => get('/auth/articles', p);

// 文章分类相关接口
export const addArticleType = p => post('/auth/articleTypes', p);
export const delArticleType = p => remove('/auth/articleTypes', p);
export const fixArticleType = p => update('/auth/articleTypes', p);
export const getArticleType = p => get('/auth/articleTypes', p);
export const getArticleTypeList = p => get('/auth/articleTypes', p);
